.class public Lcom/brixd/niceapp/callback/NiceGoodsDetailCommentShareCallback;
.super Lcom/brixd/niceapp/callback/BaseDetailCommentShareCallback;
.source "NiceGoodsDetailCommentShareCallback.java"


# instance fields
.field private mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

.field private mContext:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/brixd/niceapp/model/BaseAppModel;)V
    .registers 3
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "appModel"    # Lcom/brixd/niceapp/model/BaseAppModel;

    .prologue
    .line 15
    invoke-direct {p0}, Lcom/brixd/niceapp/callback/BaseDetailCommentShareCallback;-><init>()V

    .line 16
    iput-object p1, p0, Lcom/brixd/niceapp/callback/NiceGoodsDetailCommentShareCallback;->mContext:Landroid/content/Context;

    .line 17
    iput-object p2, p0, Lcom/brixd/niceapp/callback/NiceGoodsDetailCommentShareCallback;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    .line 18
    return-void
.end method


# virtual methods
.method public onShare(Lcn/sharesdk/framework/Platform;Lcn/sharesdk/framework/Platform$ShareParams;)V
    .registers 10
    .param p1, "platform"    # Lcn/sharesdk/framework/Platform;
    .param p2, "paramsToShare"    # Lcn/sharesdk/framework/Platform$ShareParams;

    .prologue
    .line 22
    invoke-virtual {p2}, Lcn/sharesdk/framework/Platform$ShareParams;->getText()Ljava/lang/String;

    move-result-object v1

    .line 24
    .local v1, "shareStr":Ljava/lang/String;
    const-string v3, ""

    .line 25
    .local v3, "theme":Ljava/lang/String;
    invoke-virtual {p0, v3}, Lcom/brixd/niceapp/callback/NiceGoodsDetailCommentShareCallback;->getAcceptSinaWeiboSize(Ljava/lang/String;)I

    move-result v0

    .line 26
    .local v0, "acceptSinaWeiboSize":I
    const-string v4, "SinaWeibo"

    invoke-virtual {p1}, Lcn/sharesdk/framework/Platform;->getName()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_99

    .line 27
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "//"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    iget-object v5, p0, Lcom/brixd/niceapp/callback/NiceGoodsDetailCommentShareCallback;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/BaseAppModel;->getTitle()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "--"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    iget-object v5, p0, Lcom/brixd/niceapp/callback/NiceGoodsDetailCommentShareCallback;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/BaseAppModel;->getSubTitle()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 29
    .local v2, "suffix":Ljava/lang/String;
    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v4

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v5

    sub-int v5, v0, v5

    if-le v4, v5, :cond_6b

    .line 30
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const/4 v5, 0x0

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v6

    sub-int v6, v0, v6

    add-int/lit8 v6, v6, -0x3

    invoke-virtual {v1, v5, v6}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "..."

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 34
    :cond_6b
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "@\u6700\u7f8e\u5e94\u7528\u5b98\u65b9\u5fae\u535a "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    iget-object v5, p0, Lcom/brixd/niceapp/callback/NiceGoodsDetailCommentShareCallback;->mAppModel:Lcom/brixd/niceapp/model/BaseAppModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/BaseAppModel;->getId()I

    move-result v5

    const-string v6, "weibo"

    invoke-static {v5, v6}, Lcom/brixd/niceapp/util/ShareUtils;->getNiceGoodsShareUrl(ILjava/lang/String;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 36
    invoke-virtual {p2, v1}, Lcn/sharesdk/framework/Platform$ShareParams;->setText(Ljava/lang/String;)V

    .line 39
    .end local v2    # "suffix":Ljava/lang/String;
    :cond_99
    return-void
.end method
